//#################################################
function getXMLHttpObject() {
//#################################################
	var xmlhttp;
	
	if(window.XMLHttpRequest) {	// branch for native XMLHttpRequest object
		try {
			xmlhttp = new XMLHttpRequest();
		} catch(e) {
			xmlhttp = false;
		}
	} else if(window.ActiveXObject) {	// branch for IE/Windows ActiveX version
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				xmlhttp = false;
			}
		}
	}
	return xmlhttp;
}

//#################################################
function refreshXMLHttpData(myPath,objectFunction) {
//#################################################
	if (XMLHttpObject.readyState == 4 || XMLHttpObject.readyState == 0) {
		XMLHttpObject.open("POST",myPath,true);
		XMLHttpObject.onreadystatechange = objectFunction; 
		XMLHttpObject.send(null);
	}
}

/*
// Sample function for get XML data text , plese copy to your script
function getXMLHttpDataText() {

  if (XMLHttpObject.readyState == 4) {
	results = XMLHttpObject.responseText;
	alert(results);
  }
}
*/

//#################################################
function submitXMLHttp(myPath,objectFunction) {
//#################################################
	//objectFunction = getXMLHttpData;
	refreshXMLHttpData(myPath,objectFunction);
}

if (!XMLHttpObject) var XMLHttpObject = getXMLHttpObject();